<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/9
  Time: 9:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form id="userForm" name="userForm" method="post" action="${pageContext.request.contextPath}/user/add" enctype="multipart/form-data">
        <div>
            <input type="hidden" id="errorinfo" value="${suploadFileError}"/>
            <label for="idPic">证件照</label>
            <input type="file" name="attachs" id="idPic">
            <font color="red"></font>
        </div>
        <div>
            <input type="hidden" id="erorinfo_wp" value="${uploadWpError}"/>
            <label for="workPic">工作证照片：</label>
            <input type="file" name="attachs" id="workPic">
            <font color="red"></font>
        </div>
    </form>
<script>
    var idPic = null;
    var errorinfo = null;
    var errorinfo_wp = null;
    var workPic = null;
    $(function () {
        idPic = $("#idPic");
        errorinfo = $("#errorinfo");
        workPic = $("#workPic");
        errorinfo_wp = $("#errorinfo_wp");
        if (errorinfo.val() == null || errorinfo.val() == ""){
            idPic.next().html("* 上传大小不能超过 500KB * 上传文件类型必须为：.jpg、.jpeg、.png、.pneg");
        }else{
            idPic.next().html(errorinfo.val());
        }
        if (errorinfo_wp.val() == null || errorinfo_wp.val() == ""){
            workPic.next().html("* 上传大小不能超过 500KB * 上传文件类型必须为：.jpg、.jpeg、.png、.pneg")
        }else{
            workPic.next().html(errorinfo_wp.val());
        }
    })
</script>
</body>
</html>
